#ifndef IFS_H
#define IFS_H

#include <iostream>
#include <sstream>
#include <fstream>


#include "ABB.h"
#include "AVL.h"
#include "RN.h"
#include "Splay.h"

#include "AB.h"

#define SEP ";"

#define ABancos "Bancos.txt"
#define ATarjeta "Tarjetas.txt"
#define AClientes "clientes.txt"
#define ARegisto "vehiculos.txt"

#define ALog "Log.txt"

#define BSEP "#"
#define BEND "&"
#define ABPartes "partes.btree"


class IFS
{
public:
    IFS();
    static void ReadBancos(ABB* arbol);
    static void ReadClientes(AVL* arbol);
    static void ReadTarjetas(RN* arbol, ABB* Banco, AVL* Cliente);
    static void ReadRegisto(Splay* arbol, AVL* Cliente);

    static void WriteLog(std::string mensaj);

    static void ReadPartes(AB<B>* arbol);
    static void SavePartes(AB<B>* arbol);
private:
    static std::string AB_BToSring(Pagina<B>* arbol);

};

#endif // IFS_H
